package cz.cvut.vrtisja2.muchktom.view.spinner;

import cz.cvut.vrtisja2.muchktom.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;

public class SettingsCategorySpinner extends Activity {

	// ====================Static variables===================

	// ====================Instance variables==================
	private String[] items = {"jidlo", "zbrane", "elektronika"};
	private Spinner spinner;
	
	// ====================Overriden Methods====================

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settings);
		init();
	}
	// ====================Constructors========================
	// ====================Instance Methods====================
	private void init() {
		spinner = (Spinner)findViewById(R.id.settings_category_spinner);
		spinner.setOnItemSelectedListener(selectedListener);
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);
		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		spinner.setAdapter(adapter);
	}
	
	private OnItemSelectedListener selectedListener = new OnItemSelectedListener() {

		@Override
		public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
				long arg3) {
			// TODO Auto-generated method stub
			
		}

		@Override
		public void onNothingSelected(AdapterView<?> arg0) {
			// TODO Auto-generated method stub
			
		}	
	};

	// ====================Getters & Setters===================

	// ====================Inner classes=======================

}
